Bluetooth
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!
Web Bluetooth API 的**Bluetooth
**接口
返回指代BluetoothDevice
带有指定选项的对象的Promise
。
接口
interface Bluetooth { Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options); }; Bluetooth implements EventTarget; Bluetooth implements BluetoothDeviceEventHandlers; Bluetooth implements CharacteristicEventHandlers; Bluetooth implements ServiceEventHandlers;
特性
无
方法
Bluetooth.requestDevice()
-
返回一个包含指定选项的
BluetoothDevice
对象的Promise
。
详细说明
Specification |
---|
Web Bluetooth # bluetooth |
浏览器兼容性
BCD tables only load in the browser